import { TodoActionType, ADD_TODO, REMOVE_TODO, SELECT_TODO } from './types'

export const addTodo = (name: string): TodoActionType => ({
  type: ADD_TODO,
  name
})

export const removeTodo = (id: number): TodoActionType => ({
  type: REMOVE_TODO,
  id
})

export const selectTodo = (id: number): TodoActionType => ({
  type: SELECT_TODO,
  id
})
